Skip to content

fix(lint): ignore gosec on untrusted path - #230

Merged
sebastian-pf9 merged 1 commit into
mainfrom
claude/host-reconciler-path-validation-063867
Aug 21, 2026
Merged

fix(lint): ignore gosec on untrusted path#230
sebastian-pf9 merged 1 commit into
mainfrom
claude/host-reconciler-path-validation-063867

Conversation

@sebastian-pf9

Copy link
Copy Markdown
Collaborator

Had a discussion with Claude:

  1. Disable G304 globally in .golangci.yml if you've decided BYOH doesn't have a realistic directory-traversal surface
  2. Disable it just for agent/ (lower risk, self-contained)
  3. Keep it enabled but suppress in safe spots (current approach)
  4. implement a custom OpenFileIn-like helper now, rather than waiting for stdlib:
    func readFileIn(dir, name string) ([]byte, error) {
        // Validates path is within dir, prevents traversal
    }
    

None of them really look satisfying to me. Therefore just commented it.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sebastian-pf9
sebastian-pf9 requested a review from snslk August 21, 2026 10:14

@snslk snslk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@sebastian-pf9
sebastian-pf9 merged commit 3a10407 into main Aug 21, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants